package work20241126_27;

/**
 * @author zdl
 * @date 2024/11/26
 */
public class Demo12 {
    public static void main(String[] args) {
        //用数组存储一组成绩，计算并输出它们的平均分。
        int[] arr = {77, 88, 99};
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
        }
        double avg = sum * 1.0 / arr.length;
        System.out.println(avg);
    }
}
